import React, { Component } from 'react';

import { Tabs, Tab } from 'material-ui/Tabs';
import { hashHistory } from 'react-router';

export default class TitleBars extends Component {

    constructor(props) {
        super(props);
        this.state = {
          slideUrl: 'home'
        };
    }

    handleChange (value) {

        this.setState({
            slideUrl: value
        });
        hashHistory.push(value);
    }

    render() {
        return (
            <Tabs
                onChange={this.handleChange.bind(this)}
                value={this.state.slideUrl}
                >
                <Tab label="首页管理" value='home' />
                <Tab label="发行序列号" value='pushSecret' />
                <Tab label="伙伴列表" value='partners' />
                <Tab label="查看订单" value='orders' />
                <Tab label="序列号购买记录" value='buySecret' />
            </Tabs>
        )
    }
}
